package br.com.msystem.vo;
// Generated 12/03/2013 13:33:49 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * Duplicatas generated by hbm2java
 */
@Entity
@Table(name="duplicatas"
    ,catalog="handy"
    , uniqueConstraints = @UniqueConstraint(columnNames={"NUMERO_DUPLICATA", "ITEM_DUPLICATA", "SEQ_DUPLICATA"}) 
)
public class Duplicatas  implements java.io.Serializable {


     private int duplicataSq;
     private Nfiscais nfiscais;
     private int numeroDuplicata;
     private int itemDuplicata;
     private Integer seqDuplicata;
     private BigDecimal valorDuplicata;
     private Date dtemissaoDuplicata;
     private Date dtvenctoDuplicata;
     private BigDecimal jurosDuplicata;
     private BigDecimal descontoDuplicata;
     private Set<DuplicatasPgto> duplicatasPgtos = new HashSet<DuplicatasPgto>(0);

    public Duplicatas() {
    }

	
    public Duplicatas(int numeroDuplicata, int itemDuplicata, Date dtemissaoDuplicata, Date dtvenctoDuplicata) {
        this.numeroDuplicata = numeroDuplicata;
        this.itemDuplicata = itemDuplicata;
        this.dtemissaoDuplicata = dtemissaoDuplicata;
        this.dtvenctoDuplicata = dtvenctoDuplicata;
    }
    public Duplicatas(Nfiscais nfiscais, int numeroDuplicata, int itemDuplicata, Integer seqDuplicata, BigDecimal valorDuplicata, Date dtemissaoDuplicata, Date dtvenctoDuplicata, BigDecimal jurosDuplicata, BigDecimal descontoDuplicata, Set<DuplicatasPgto> duplicatasPgtos) {
       this.nfiscais = nfiscais;
       this.numeroDuplicata = numeroDuplicata;
       this.itemDuplicata = itemDuplicata;
       this.seqDuplicata = seqDuplicata;
       this.valorDuplicata = valorDuplicata;
       this.dtemissaoDuplicata = dtemissaoDuplicata;
       this.dtvenctoDuplicata = dtvenctoDuplicata;
       this.jurosDuplicata = jurosDuplicata;
       this.descontoDuplicata = descontoDuplicata;
       this.duplicatasPgtos = duplicatasPgtos;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="DUPLICATA_SQ", unique=true, nullable=false)
    public int getDuplicataSq() {
        return this.duplicataSq;
    }
    
    public void setDuplicataSq(int duplicataSq) {
        this.duplicataSq = duplicataSq;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="NFISCAL_SQ")
    public Nfiscais getNfiscais() {
        return this.nfiscais;
    }
    
    public void setNfiscais(Nfiscais nfiscais) {
        this.nfiscais = nfiscais;
    }

    
    @Column(name="NUMERO_DUPLICATA", nullable=false)
    public int getNumeroDuplicata() {
        return this.numeroDuplicata;
    }
    
    public void setNumeroDuplicata(int numeroDuplicata) {
        this.numeroDuplicata = numeroDuplicata;
    }

    
    @Column(name="ITEM_DUPLICATA", nullable=false)
    public int getItemDuplicata() {
        return this.itemDuplicata;
    }
    
    public void setItemDuplicata(int itemDuplicata) {
        this.itemDuplicata = itemDuplicata;
    }

    
    @Column(name="SEQ_DUPLICATA")
    public Integer getSeqDuplicata() {
        return this.seqDuplicata;
    }
    
    public void setSeqDuplicata(Integer seqDuplicata) {
        this.seqDuplicata = seqDuplicata;
    }

    
    @Column(name="VALOR_DUPLICATA", precision=9)
    public BigDecimal getValorDuplicata() {
        return this.valorDuplicata;
    }
    
    public void setValorDuplicata(BigDecimal valorDuplicata) {
        this.valorDuplicata = valorDuplicata;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="DTEMISSAO_DUPLICATA", nullable=false, length=19)
    public Date getDtemissaoDuplicata() {
        return this.dtemissaoDuplicata;
    }
    
    public void setDtemissaoDuplicata(Date dtemissaoDuplicata) {
        this.dtemissaoDuplicata = dtemissaoDuplicata;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="DTVENCTO_DUPLICATA", nullable=false, length=19)
    public Date getDtvenctoDuplicata() {
        return this.dtvenctoDuplicata;
    }
    
    public void setDtvenctoDuplicata(Date dtvenctoDuplicata) {
        this.dtvenctoDuplicata = dtvenctoDuplicata;
    }

    
    @Column(name="juros_duplicata", precision=10)
    public BigDecimal getJurosDuplicata() {
        return this.jurosDuplicata;
    }
    
    public void setJurosDuplicata(BigDecimal jurosDuplicata) {
        this.jurosDuplicata = jurosDuplicata;
    }

    
    @Column(name="desconto_duplicata", precision=10)
    public BigDecimal getDescontoDuplicata() {
        return this.descontoDuplicata;
    }
    
    public void setDescontoDuplicata(BigDecimal descontoDuplicata) {
        this.descontoDuplicata = descontoDuplicata;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="duplicatas")
    public Set<DuplicatasPgto> getDuplicatasPgtos() {
        return this.duplicatasPgtos;
    }
    
    public void setDuplicatasPgtos(Set<DuplicatasPgto> duplicatasPgtos) {
        this.duplicatasPgtos = duplicatasPgtos;
    }




}


